﻿@{
    Layout = "_LayoutPhone";
}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
<link rel="apple-touch-icon" href="img/favicon-apple.png">
<link rel="icon" href="img/favicon.png">

<!-- Bootstrap CSS -->
<!-- Material design icons CSS -->
<link rel="stylesheet" href="~/GoTRI/vendor/materializeicon/material-icons.css">
<!-- aniamte CSS -->
<link rel="stylesheet" href="~/GoTRI/vendor/animatecss/animate.css">

<!-- swiper carousel CSS -->
<link rel="stylesheet" href="~/GoTRI/vendor/swiper/css/swiper.min.css">

<!-- daterange CSS -->
<link rel="stylesheet" href="~/GoTRI/vendor/bootstrap-daterangepicker-master/daterangepicker.css">

<!-- footable CSS -->
<link rel="stylesheet" href="~/GoTRI/vendor/footable-bootstrap/css/footable.bootstrap.min.css">

<!-- jvector map CSS -->
<link rel="stylesheet" href="~/GoTRI/vendor/jquery-jvectormap/jquery-jvectormap-2.0.3.css">

<!-- app CSS -->
<link id="theme" rel="stylesheet" href="~/GoTRI/css/purplesidebar.css" type="text/css">

<header style="width: 100%; height: 4rem; background-color: rgb(255,135,0);top:0px;position: fixed;z-index: 1;">
    <a href="PhoneGongGaoList">
        <img src="~/GoTRI/img/left.png" alt="" style="float: left;
            width: 1rem;
            height: 2rem;
            margin-left: 1rem;
            margin-top: 1rem;
            position:absolute;
	        left:0px;
	        top:0px;
	        z-index:1;">
    </a>
    <div style=" width: 100%; height: 4rem; line-height: 4rem; text-align: center; color: #fff; font-size: 1.3rem;">公告审批</div>
</header>
<div style="width:1px;padding-bottom:50px"></div>
<script>
    $(".yi").attr("hidden", "");
</script>
<div class="wrapper">
    <div class="container mt-4 main-container">
        <div class="row">
            <div class="col-12 col-md-6">
                <div class="card mb-4">
                    <div class="card-body">
                        <h5><center id="BiaoTi"></center></h5>
                        <span id="ShiJian" style="font-size: 10px;color:gray;"></span><span style="float:right;font-size: 10px;color:gray;" id="FaBuRen"></span><br />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id="NeiRong"></span>
                        <div>
                            <a class="btn btn-success btn-outline" onclick="ShenPi(1);" style="width: 20%; margin-left: 25%; margin-top: 20px;">批准</a>
                            <a class="btn btn-warning btn-outline" onclick="ShenPi(2);" style="width: 20%; margin-left: 10%; margin-top: 20px;">驳回</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div style="margin-bottom: 50px;padding-bottom:1px"></div>
<script src="~/GoTRI/js/jquery-3.2.1.min.js"></script>
<script src="~/GoTRI/js/popper.min.js"></script>

<!-- Cookie jquery file -->
<script src="~/GoTRI/vendor/cookie/jquery.cookie.js"></script>

<!-- sparklines chart jquery file -->
<script src="~/GoTRI/vendor/sparklines/jquery.sparkline.min.js"></script>

<!-- Circular progress gauge jquery file -->
<script src="~/GoTRI/vendor/circle-progress/circle-progress.min.js"></script>

<!-- Swiper carousel jquery file -->
<script src="~/GoTRI/vendor/swiper/js/swiper.min.js"></script>

<!-- Chart js jquery file -->
<script src="~/GoTRI/vendor/chartjs/Chart.bundle.min.js"></script>
<script src="~/GoTRI/vendor/chartjs/utils.js"></script>

<!-- Footable jquery file -->
<script src="~/GoTRI/vendor/footable-bootstrap/js/footable.min.js"></script>

<!-- datepicker jquery file -->
<script src="~/GoTRI/vendor/bootstrap-daterangepicker-master/moment.js"></script>
<script src="~/GoTRI/vendor/bootstrap-daterangepicker-master/daterangepicker.js"></script>

<!-- jVector map jquery file -->
<script src="~/GoTRI/vendor/jquery-jvectormap/jquery-jvectormap.js"></script>
<script src="~/GoTRI/vendor/jquery-jvectormap/jquery-jvectormap-world-mill-en.js"></script>

<!-- datepicker jquery file -->
<script src="~/GoTRI/vendor/bootstrap-daterangepicker-master/moment.js"></script>
<script src="~/GoTRI/vendor/bootstrap-daterangepicker-master/daterangepicker.js"></script>

<!-- Dropzone jquery file -->
<script src="~/GoTRI/vendor/dropzone-master/dropzone.js"></script>

<!-- circular progress file -->
<script src="~/GoTRI/vendor/circle-progress/circle-progress.min.js"></script>

<!-- Application main common jquery file -->
<script src="~/GoTRI/js/main.js"></script>
<script src="~/admui-13945148017-1592211513218/public/js/tsk/sweetalert.min.js"></script>
<script>
    $(document).ready(function () {

        xingwenzhanshi();
    });
    function xingwenzhanshi() {
        var Id = GetQueryString("Id");
        $.ajax({
            type: 'post',
            url: '../PhoneGongGao/PhoneGongGaoShenPiXinXi',
            data: { "Id": Id },
            async: false,
            dataType: 'json',
            success: function (date) {
                var json = date;
                $.each(json, function (index) {
                    $("#BiaoTi").text(json[index].BiaoTi);
                    $("#ShiJian").text("时间:" + json[index].ShiJian);
                    $("#FaBuRen").text("发布人:" + json[index].FaBuRen);
                    $("#NeiRong").text(json[index].NeiRong);
                })
            },
        });
    }
    function ShenPi(panduan) {
        var Id = GetQueryString("Id");
        $.ajax({
            type: 'post',
            url: '../GongGao/GongGaoShenPi',
            dataType: 'text',
            async: true,
            data: { panduan: panduan, Id: Id },
            success: function (result) {
                swal("审批成功", "操作成功!", "success");
                setTimeout(function () { window.location.href = "../PhoneGongGao/PhoneGongGaoList"; }, 2000);
                
            }
        });
    }
    //获取数据方法
    function GetQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return unescape(r[2]); return null;
    }
</script>
